package graphics.view3D;

import model.Square;
import graphics.interfaces.IDrawable;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;

public class Board3D implements IDrawable {
	
	private Sprite sprite;
	//private Sprite spriteSelectedSquare;
	//private Square selectedSquare;
	
	public void LoadContent(){
		Texture wbTexture = new Texture(Gdx.files.internal("data/images/plateau.png"));
		TextureRegion region = new TextureRegion(wbTexture, 0, 0, 640, 480);
		// TODO implement Board3D.LoadContent()
		
		// main board squares sprites
		sprite = new Sprite(region, 0, 0, 640, 480);
	}
	
	public void Draw(SpriteBatch spriteBatch){
		// Draw board
		sprite.draw(spriteBatch);
		
		// TODO highlight selected square
		// Draw selected square tile
		/*
		if(selectedSquare!=Square.OUT_OF_RANGE){
			int x = selectedSquare.getCol();
			int y = selectedSquare.getRow();
			spriteSelectedSquare.setPosition(60 * x, 60 * y);
			spriteSelectedSquare.draw(spriteBatch);
		}
		*/
	}
	
	public void SelectSquare(Square square) {
		//selectedSquare = square;
	}
	
	public void UnselectSquare() {
		//selectedSquare = Square.OUT_OF_RANGE;
	}
}
